package com.net.xpay.common.service;

import com.net.xpay.common.domain.User;
import com.net.xpay.common.domain.invoice.DeliveryAddress;
import com.net.xpay.common.domain.invoice.InvoiceTitle;
import com.net.xpay.core.domain.ChargeRecord;
import com.net.xpay.core.model.DeliveryAddressModel;
import com.net.xpay.core.model.InvoiceModel;
import com.net.xpay.core.model.InvoiceTitleModel;
import com.net.xpay.core.model.OpenInvoiceModel;

import java.util.List;

/**
 * 发票管理
 * @author 86188
 */
public interface InvoiceService {

    /**
     * 新增发票信息
     */
    void saveInvoiceTitle(InvoiceTitleModel model);
    /**
     * 修改发票信息
     */
    void updateInvoiceTitle(InvoiceTitleModel model);
    /**
     * 查询发票信息
     */
    List<InvoiceTitle> listInvoiceTitle(User merchant);
    /**
     * 新增邮寄地址
     */
    void saveDeliveryAddress(DeliveryAddressModel model);
    /**
     * 查询邮寄地址
     */
    List<DeliveryAddress> getDeliveryAddress(User merchant);
    /**
     * 修改邮寄地址
     */
    void updateDeliveryAddress(DeliveryAddressModel model);
    /**
     * 设为默认地址
     */
    void setAsDefaultDeliveryAddress(Long userId,Long id);
    /**
     * 删除邮寄地址
     */
    void deleteDeliveryAddress(Long userId,Long id);
    /**
     * 添加发票
     */
    void addInvoice(Long userId, InvoiceModel model);
    /**
     * 后台开具发票
     */
    void openInvoice(OpenInvoiceModel model);
    /**
     * 后台开具发票失败
     */
    void openInvoiceFail(OpenInvoiceModel model);

    /**
     * 查询关联充值记录
     */
    List<ChargeRecord> listRelatedChargeRecord(Long userId, Long id);
    /**
     * 后台查询关联充值记录
     */
    List<ChargeRecord> adminListRelatedChargeRecord(Long id);
}
